<template>
  <div class="container">
    <a-table class="table" :rowKey="row => row.id" :dataSource="list">
      <a-table-column title="描述" width="60px">
        <template slot-scope="row">
          <div>{{row.description}}</div>
        </template>
      </a-table-column>

      <a-table-column title="数额" width="60px">
        <template slot-scope="row">
          <div>{{row.value/100}}元</div>
        </template>
      </a-table-column>

      <a-table-column title="时间" width="60px">
        <template slot-scope="row">
          <div>{{row.created_at}}</div>
        </template>
      </a-table-column>
      
    </a-table>


  </div>
</template>

<script>
  import moment from 'moment'

  export default {
    components: {

    },
    data() {
      return {
        info: {},
        list: []
      }
    },
    computed: {
    },
    props: {
      user_id: 0,
      logtype: 0
    },
    created() {
      this.fetchData();
    },
    filters: {
      
    },
    mounted() {},
    watch: {},
    methods: {
      fetchData () {
        this.$http.get('/agents5/record_log', {
          'params': {
            user_id: this.user_id,
            type: this.logtype,
          }
        }).then(res => {
          this.list = res.data.list
        }).finally(() => {
          this.loading = false
        })

      },
      cancel() {
        this.$router.back(-1)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .headimg {
    width: 28px;
    height: 28px;
    border-radius: 50%;
  }


  .form-container {
    padding-bottom: 120px;
  }

  .container {
    .btn {
      margin-right: 30px;
    }
  }

  .tips-c {
    margin-bottom: 20px;
    font-weight: 500;
  }
</style>
